<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport"
          content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0"/>
    <meta name="format-detection" content="telephone=no,email=no,date=no,address=no">
    <meta name="format-detection" content="telephone=no"/>
    <title>输入金额</title>
    <link rel="stylesheet" type="text/css" href="../css/aui.css"/>
    <link rel="stylesheet" type="text/css" href="../css/aui-flex.css"/>
    <style type="text/css">

    </style>
</head>
<body>

<div class="test">单击</div>

<script type="text/javascript" src="../script/keyboard2.js"></script>
<script type="text/javascript" src="../script/jquery.min.js"></script>
<script type="text/javascript" src="../script/common.js"></script>

<script type="text/javascript">

    $(function () {
        $(".test").click(function () {
            ajaxRequest2("http://www.aijiangli.com/yii/web/api/app/category/supplier","get",{},function (ret,err) {
                alert(ret.data)
            },function (ret,err) {
                alert("dd")
            })

        })
    })
    function ajaxRequest2(url, method, datas, successCallBack, errorCallback) {
            $.ajax({
                    url: url,
                    method: method,
                    cache: false,
                    timeout: 60,
                    dataType: 'jsonp',
                    data: datas
                }, function (ret, err) {
                alert(ret)
                    if (!ret.success) {
                        api.hideProgress();
                        hideLoading();
                        if (!errorCallback) {
                            api.toast({
                                msg: ret.message
                            })
                        } else {
                            errorCallback(ret)
                        }
                    } else {
                        api.hideProgress();
                        hideLoading();
                        successCallBack(ret, err)
                    }
                }
            );

    }
</script>

</body>
</html>
